package templatemethod.example;

/**
 * @Author：LJ
 * @Description：
 * @Date: 2017/11/27
 * @Modified By:
 */
public abstract class HummerModel {
    public abstract void start();

    public abstract void stop();

    public abstract void alarm();

    public abstract void engineBoom();

    public final void run() {//为了防止恶意操纵,模板方法一般都加上final关键字,不允许覆写
        start();
        engineBoom();
        alarm();
        stop();
    }
}
